package day14;

public class Lx1 {
	public static void main(String []args){
		Container1 c10 = new Container1("aa",11);
		Container1 c11 = new Container1("aa","bb");
		Container1 c12 = new Container1(1.1,2.1);
		System.out.println(c10.getKey()+":"+c10.getValue());
		System.out.println(c11.getKey()+":"+c10.getValue());
		System.out.println(c12.getKey()+":"+c10.getValue());
		
		Container2<String,Integer> c1 = new Container2<String,Integer>("aa",11);
		Container2<Double,Integer> c2 = new Container2<Double,Integer>(1.1,11);
		Container2<Character,Integer> c3 = new Container2<Character,Integer>('a',11);
		System.out.println(c1.getKey()+":"+c1.getValue());
		System.out.println(c2.getKey()+":"+c2.getValue());
		System.out.println(c3.getKey()+":"+c3.getValue());
		
	}
}
class Container1{
	private Object key;
	private Object value;
	public Object getKey() {
		return key;
	}
	public void setKey(Object key) {
		this.key = key;
	}
	public Object getValue() {
		return value;
	}
	public void setValue(Object value) {
		this.value = value;
	}
	public Container1(Object k,Object v){
		this.key=k;
		this.value=v;
	}
}

class Container2<k,v>{
	private k key;
	private v value;
	public k getKey() {
		return key;
	}
	public void setKey(k key) {
		this.key = key;
	}
	public v getValue() {
		return value;
	}
	public void setValue(v value) {
		this.value = value;
	}
	public Container2(k k,v v){
		this.key=k;
		this.value=v;
	}
}